package cn.csust.net2.manager.shared.po;

import java.io.Serializable;

import cn.csust.net2.manager.shared.vo.TreeNode;
import cn.csust.net2.manager.shared.xml.XmlInfo;
import cn.csust.net2.manager.shared.xml.XmlResources;

import com.extjs.gxt.ui.client.data.BeanModelTag;
public class Banji extends PO implements Serializable,BeanModelTag,TreeNode {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private static String DISPLAYNAME = "banjiName";
	private Integer banjiID;
	private String banjiName;
	private String grade;
	
	private String remark;
	
	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	private Major major;

	public Major getMajor() {
		return major;
	}

	public void setMajor(Major major) {
		this.major = major;
	}

	public Integer getBanjiID() {
		return banjiID;
	}

	public void setBanjiID(Integer banjiID) {
		this.banjiID = banjiID;
	}

	public String getBanjiName() {
		return banjiName;
	}

	public void setBanjiName(String banjiName) {
		this.banjiName = banjiName;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Class getSelf() {
		// TODO Auto-generated method stub
		return Banji.class;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Class[] getChildren() {
		// TODO Auto-generated method stub
		return new Class[]{Student.class};
	}

	@Override
	public String getNodeId() {
		// TODO Auto-generated method stub
		return this.getBanjiID().toString();
	}

	@Override
	public String getNodeName() {
	
		return this.getBanjiName();
	}

	@Override
	public String toString() {
	
		return this.getGrade()+this.getBanjiName();
	}

	@Override
	public XmlInfo getXmlInfo(XmlResources instance) {
		// TODO Auto-generated method stub
		XmlInfo xmlInfo = new XmlInfo();
		xmlInfo.setTextResource(instance.banji());
		return xmlInfo;
	}

	@Override
	public String getDisplayName() {
		// TODO Auto-generated method stub
		return DISPLAYNAME;
	}

	@Override
	public String getNodeIdName() {
		// TODO Auto-generated method stub
		return "banjiID";
	}

	
	

}
